# 1 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/echosatrec.bjw"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/echosatrec.bjw"
;$DIR=/opt/topspin3.2/exp/stan/nmr/lists/pp/user/echosatrec.bjw
;$CLASS=Solids
;$DIM=2D
;  F2 -> directly acquired, F1 -> magnetization recovery
;$TYPE=direct excitation
;$COMMENT=basic saturation recovery experiment
;  OPTIONS: Heteronuclear decoupling on f2

;ns 2-step phase cycle
;p1 X pi/2 pulse
;p2 X pi pulse
;p20 saturation pulse length
;pl1 pulse power on channel f1
;pl20 saturation pulse power
;d1 safety delay
;d20 saturation delay
;l6 echo shift / rotor periods
;l20 saturation pulse loops
;vdlist list of recovery delays
;cnst31 spin rate / Hz

;zgoptns -Dfid -Ddec
;p21 1H saturation pulse length
;p31 1H decoupling pulse length
;pl2 =120; not used
;pl21 1H saturation pulse power
;pl12 decoupling power level
;pl13 decoupling power level
;pcpd2 1H decoupling program pulse
;cpdprg2 cw, tppm, spinal (pl12), fslg (pl13)
# 32 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/echosatrec.bjw"
define pulse tr                      ;rotor period
  "tr=1s/cnst31"
define pulse tau                     ;echo shift
  "tau=l6*tr"

"d6=tau-p2/2"

# 40 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/echosatrec.bjw"
"d7=d6-de"


# 46 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/echosatrec.bjw"
1  zd                                ;dummy scans are pointless and may partially conceal poor saturation
2  1u                                ; so just avoid using them entirely


# 54 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/echosatrec.bjw"
   d1                                ;safety delay

   3u pl20:f1                        ;saturate on one or both channels
20 d20
   p20:f1 ph20^

# 65 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/echosatrec.bjw"
   lo to 20 times l20
   vd pl1:f1                        ;recycle delay and preselection of f1 drive power


# 72 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/echosatrec.bjw"
   (p1 ph1):f1
   d6
   (p2 ph2):f1


   d7                                ;wait until echo top to activate receiver
# 80 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/echosatrec.bjw"
   go=2 ph31


# 85 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/echosatrec.bjw"
     
   10m wr #0 if #0 ivd
   lo to 1 times td1
exit

ph1 = 0 2 1 3
ph2 = 0
ph20= 0 1
ph21= 0 1
ph30= 0
ph31= 0 2 3 1
